<html	xmlns="http://www.w3.org/1999/xhtml"
		xmlns:jsp="http://java.sun.com/JSP/Page"
		xmlns:f="http://java.sun.com/jsf/core"      
		xmlns:h="http://java.sun.com/jsf/html"
		xmlns:c="http://java.sun.com/jsp/jstl/core"
		xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
		xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
      
    <h:head>
        <title>Stock des films achetés</title>
		<link rel="stylesheet" href="../styles/style.css" />
    </h:head>
	
	<h:body>
		<h:panelGroup rendered="#{loginBean.loginSucces}">
	    <ui:include src="../includes/header.xhtml" />
    	<ui:include src="../includes/menu.xhtml" />
    	
    	<div id="content">
	    	<h2>Stock des films achetés</h2>
	    	
	<h:form>  
	    <p:dataTable var="copie" value="#{afficherStockBean.copies}">  
   		    <p:column headerText="ID">  
    		    <h:outputText value="#{copie.id}" />  
 	     	</p:column>  
  
  			<p:column sortBy="#{copie.film.titre}" headerText="Titre du film">  
  	        	<h:outputText value="#{copie.film.titre}" />  
  	      	</p:column>  
  	
  		     <p:column sortBy="#{copie.cinema.nom}" headerText="Cinema attribué">  
   	    	     <h:outputText value="#{copie.cinema.nom}" />  
   	    	 </p:column>  
 	 
     		<p:column sortBy="#{copie.etat}" headerText="État de la copie">  
            	<h:outputText value="#{copie.etat}" />  
        	</p:column>  
    	</p:dataTable>  
	</h:form> 
		
		</div>
		<ui:include src="../includes/footer.xhtml" />
		
    	</h:panelGroup>
    	
    	<h:panelGroup rendered="#{!loginBean.loginSucces}">
			<ui:include src="../includes/authError.xhtml" />	
    	</h:panelGroup>
	</h:body>
</html>